from machine import Pin
import time

led = Pin(2, Pin.OUT)

def led_status(value):
    if value:
        led.on()
    else:
        led.off()
        
def set_io_value(pin, value):
    _gpio = Pin(pin, Pin.OUT)
    if value is 1:
        _gpio.on()
    else:
        _gpio.off()